<?php 
if( isset($article['Upload']) and count($article['Upload']) > 0 ) {
	$class_img = 'has-image';
} else {
	$class_img = '';
}
?>
<div class="article listview <?php echo $class_img ?>">
	
	<h2><?php echo $html->link($article['Article']['title'], array('action'=>'view', $article['Article']['slug'])); ?> </h2>
	<?php if( $class_img == "has-image" ):?>
		<div class="attribute-images">
			<?php 
			$upload_path = $article['Upload'][0]['dir'] . DS . $article['Upload'][0]['filename'];
			
			?>
			<?php echo $html->link(
			    $gershImage->resize($upload_path, "articlethumb", array('title'=>$article['Upload'][0]['filename'], 'alt'=>$article['Upload'][0]['filename'])),
			    array('action'=>'view', $article['Article']['slug']),
			    null, null, false
			);
			?>
		</div>
	<?php endif; ?>
	<div class="attribute-meta">
		<span class="attribute-label attribute-date"><?php echo __('Date', true) ?></span>
		<span class="attribute-value attribute-date"><?php echo $time->niceShort($article['Article']['created']) ?></span>
		<span class="attribute-label attribute-views"><?php echo __('Views', true) ?></span>
		<span class="attribute-value attribute-views"><?php echo $article['Article']['views']; ?></span>
		<span class="attribute-label attribute-views"><?php echo __('Comments', true) ?></span>
		<span class="attribute-value attribute-views">
			<?php echo $this->element('../comments/count', array('plugin' => 'comments', 'cache'=> array('time'=>'+2 hour','key'=> $article['Article']['slug']), 'url'=>$html->url(array('action'=>'view', $article['Article']['slug'])))); ?>
		</span>
	</div>
	<div class="attribute-intro">
		<?php echo $article['Article']['intro']; ?>	
	</div>
	<p class="attribute-link"><?php echo $html->link(__('Read more', true), array('action'=>'view', $article['Article']['slug'])); ?></p>
	
</div>
